package com.baide.xguangji.plc;

import io.netty.channel.Channel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @Author: create by DFX
 * @Date: 2020/4/23 22:20
 * @Version: V1.0.0
 * @Tips:
 */
@Component
public class NioObjectHandle {

    private Logger logger = LoggerFactory.getLogger(NioObjectHandle.class);

    public void receiver(Channel channel, String in) {
        logger.info("------->接收来自" + channel.remoteAddress() + "消息：" + in);
        System.out.println(channel.remoteAddress());
        channel.writeAndFlush("gg");//G个毛 好好代码行吗？
    }
}
